package com.base.cn.platform.os.controller.user.exprule;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.common.mybatis.Pagination;
import com.base.cn.platform.os.entity.user.exprule.CusUserExpRecord;
import com.base.cn.platform.os.service.user.exprule.CusUserExpRecordBiz;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 经验记录接口
 *
 * @author ll
 * @create 2018-04-20
 */
@RestController
@RequestMapping("/manage/user")
public class CusUserExpRecordController extends BaseController {

    @Autowired
    private CusUserExpRecordBiz cusUserExpRecordBiz;

    /**
     * 搜索经验记录列表
     * @param currentPage
     * @param cusUserExpRecord
     * @return
     */
    @RequestMapping("/queryCusUserExpRecordPage")
    public PageInfo<CusUserExpRecord> queryCusUserExpRecordPage(@RequestParam(value = "currentPage",required = false,defaultValue = "1")int currentPage,
                                                                @RequestBody CusUserExpRecord cusUserExpRecord,
                                                                @RequestParam(value = "expRule",required = false,defaultValue = "false")boolean expRule){
        Pagination page = new Pagination();
        page.setCurrentPage(currentPage);
        return cusUserExpRecordBiz.queryCusUserExpruleRecordPage(page,cusUserExpRecord,null,expRule);
    }
}
